export function mapState(stateArr) {
  const res = {};
  for (let i = 0; i < stateArr.length; i++) {
    let stateName = stateArr[i];
    res[stateName] = function() {
      return this.$store.state[stateName];
    };
  }
  return res;
}
export function mapGetters(getterArr) {
  const res = {};
  for (let i = 0; i < getterArr.length; i++) {
    let getterName = getterArr[i];
    res[getterName] = function() {
      return this.$store.getters[getterName];
    };
  }
  return res;
}
